/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Universidad de Almeria
 * License Type: Purchased
 */
package agenda;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class RegistroDetachedCriteria extends AbstractORMDetachedCriteria {
	public final StringExpression nombre;
	public final StringExpression telefono;
	
	public RegistroDetachedCriteria() {
		super(agenda.Registro.class, agenda.RegistroCriteria.class);
		nombre = new StringExpression("nombre", this.getDetachedCriteria());
		telefono = new StringExpression("telefono", this.getDetachedCriteria());
	}
	
	public RegistroDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, agenda.RegistroCriteria.class);
		nombre = new StringExpression("nombre", this.getDetachedCriteria());
		telefono = new StringExpression("telefono", this.getDetachedCriteria());
	}
	
	public Registro uniqueRegistro(PersistentSession session) {
		return (Registro) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Registro[] listRegistro(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Registro[]) list.toArray(new Registro[list.size()]);
	}
}

